import axios from '@/http/axios'

const user = {
    // 列表
    list (data) {
        return axios.post('/video/list', { ...data, limit: 5 })
    },
    // 点赞
    like (data) {
        return axios.post('/like/on', data)
    },
    // 取消点赞
    cancelLike (data) {
        return axios.post('/like/off', data)
    },
    // 评论列表
    commentList (data) {
        return axios.post('/comment/list', { ...data, type: 1, limit: 10 })
    },
    // 评论
    comment (data) {
        return axios.post('/comment/add', { ...data, type: 1 })
    },
    // 评论点赞
    commentLike (data) {
        return axios.post('/comment/onLike', data)
    },
    // 取消评论点赞
    cancelCommentLike (data) {
        return axios.post('/comment/offLike', data)
    },
    // 取消评论点赞
    releaseVideo (data) {
        return axios.post('/video/add', data)
    },
    // 已发布列表
    publishedList (data) {
        return axios.post('/video/me', { ...data, limit: 9 })
    },
    commentTable (data) {
        return axios.post('/comment/commentList', { ...data, limit: 10 })
    }
}

export default user
